package com.zjut.azhen.DBDesign.service;

import com.zjut.azhen.DBDesign.bean.Students;
import com.zjut.azhen.DBDesign.bean.Teacher;
import com.zjut.azhen.DBDesign.mapping.StudentsMapper;
import com.zjut.azhen.DBDesign.mapping.TeacherMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author asus
 */
@Service
public class TeacherService {
    @Autowired
    TeacherMapper teacherMapper;
    public List<Teacher> getAll(){
        return teacherMapper.getAll();
    }
    public Integer updateTeacherById(Teacher teacher){

        return teacherMapper.updateTeacher(teacher);
    }
    public Integer insertTeacher(Teacher teacher){
        return teacherMapper.insertTeacher(teacher);
    }

    public Integer deleteTeacherById(String id){
        return teacherMapper.deleteTeacherByid(id);
    }

    public Integer insertScore(String sno,String cno,Float score){
        return teacherMapper.insertScore(sno,cno,score);
    }

}
